<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAppointmentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('c_appointments', function (Blueprint $table) {
            $table->increments('id');
            $table->string('phone', 11)->default(null)->comment('电话');
            $table->string('type', 2)->default(0)->comment('类型1图文2电话');
            $table->string('doc_id', 11)->default(0)->comment('医生ID');
            $table->string('user_id', 11)->default(0)->comment('用户ID');
            $table->date('dates')->default(null)->comment('日期');
            $table->time('times')->default(null)->comment('时间');
            $table->string('remark', 100)->default(null)->comment('备注');
            $table->decimal('price')->default(0)->comment('价格');
            $table->integer('pay_status')->default(0)->comment('支付状态');
            $table->integer('pay_type')->default(0)->comment('支付类型');
            $table->integer('status')->default(0)->comment('核销状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('c_appointments');
    }
}
